package com.example.foo.order.model;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订单
 */
@com.baomidou.mybatisplus.annotation.TableName("orders")
public class Order extends com.example.core.model.BaseEntity {

    private static final long serialVersionUID = 1L;

    public enum HandlingMethod {
        give(2, "赠送"),
        noSplit(1, "不分期购买"),
        split(0, "分期购买"),
        ;
        public final Integer val;
        public final String text;
        HandlingMethod(Integer val, String text) {
            this.val = val;
            this.text = text;
        }
    }

    public enum PayType {
        WX_JSAPI("wxpay_jsapi"),
        WX_APP("wxpay_app"),
        ALI_APP("alipay_app"),
        CASH_PAY("cash_pay"),
        ;
        public final String text;
        PayType(String text) {
            this.text = text;
        }
    }

    public enum GoodsType {
        GOODS( "goods"),//需要分账
        GIFT("gift"),
        TTN("229"),//需要分账
        GOODSPro("168b"),//需要分账
        GIFTPro("168bGift"),
        GOODS_C1("168c1"),//需要分账 不需要分佣省市区 与card购机状态无关
        GOODS_C2("168c2"),//不需要分账 需要分佣省市区 与card购机状态相关
        GIFT_C2("168c2Gift"),
        GOODS_C3("168c3"),//不需要分账 需要分佣省市区 与card购机状态相关
        GIFT_C3("168c3Gift"),
        LX_229_A("lx229a"), //不需要分账
        LX_229_B("lx229b"), //不需要分账
        ZJ_229_A("zj229a"),
        ZJ_168_B("zj168b"),
        ZJ_99_C("zj99c"),
        ZJ_39_D("zj39d"),
        ZJ_3000_E("zj3000e"),
        VK_1699("vik1699"),
        A96("A96"),
        ZJ_4399("zj4399"),
        ZJ_4799("zj4799"),
        ZJ_4999("zj4999"),
//        ZJ_2w("zj2w"),//下架
        ZJ_3w("zj3w"),
        V15P_4199("v15p4199"),
        I18P_4899("i18p4899"),
        V16P_4399("v16p4399"),
        K9P_6499("k9p6499"),
        ;
        public final String text;
        GoodsType(String text) {
            this.text = text;
        }
    }

    public enum PayStatus {
        failed(-1, "支付失败"),
        pending(0, "待支付"),
        processed(1, "已支付"),
        ;
        public final Integer val;
        public final String text;
        PayStatus(Integer val, String text) {
            this.val = val;
            this.text = text;
        }
    }

    public enum Status {
        waitPay(0, "待支付"),
        pending(1, "待发货"),
        delivery(2, "待收货"),
        takeDelivery(3, "已收货"),
        finished(4, "已完成"),
        ;
        public final Integer val;
        public final String text;
        Status(Integer val, String text) {
            this.val = val;
            this.text = text;
        }
    }

    /**
     * 用户ID
     */
    private Long pid;

    /**
     * 用户ID
     */
    private Long uid;

    /**
     * 商品ID
     */
    private Long itemId;

    /**
     * 订单号
     */
    private String outTradeNo;

    /**
     * 支付订单号
     */
    private String transactionNo;

    /**
     * 卡号
     */
    private String cardSn;

    /**
     * 收货人姓名
     */
    private String realName;

    /**
     * 收货人电话
     */
    private String userPhone;

    private String province;

    private String city;

    private String district;

    /**
     * 收货人详细地址
     */
    private String addressDetail;

    /**
     * 商品详情
     */
    private String goodsDetail;

    /**
     * 主图
     */
    private String picUrl;

    /**
     * 多图
     */
    private String picUrlJson;

    /**
     * 文本
     */
    private String body;


    /**
     * 商品类型
     */
    private String goodsType;

    /**
     * 订单总价
     */
    private BigDecimal totalPrice;

    /**
     * 减免金额
     */
    private BigDecimal deductionAmount;

    /**
     * 实际支付金额
     */
    private BigDecimal payPrice;

    /**
     * 办理方式
     */
    private Integer handlingMethod;

    /**
     * 支付时间
     */
    private LocalDateTime payTime;

    /**
     * 支付方式
     */
    private String payType;

    /**
     * 支付状态
     */
    private Integer payStatus;

    /**
     * 订单状态
     */
    private Integer status;

    /**
     * 物流公司
     */
    private String deliveryCompany;

    /**
     * 物流单号
     */
    private String deliverySn;

    /**
     * 发货日期
     */
    private String deliveryDate;

    /**
     * 发货时间
     */
    private LocalDateTime deliveryTime;

    /**
     * 收货时间
     */
    private LocalDateTime takeTime;

    /**
     * 订单完成时间
     */
    private LocalDateTime finishTime;

    /**
     * 订单完成时间
     */
    private LocalDateTime selfWithdrawalTime;

    /**
     * 订单返钱用户id
     */
    private Long backUserInfoId;

    /**
     * 联想渠道id
     */
    private Long lxChannelId;

    /**
     * appID
     */
    private String appId;

    public Order() {
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public Long getBackUserInfoId() {
        return backUserInfoId;
    }

    public void setBackUserInfoId(Long backUserInfoId) {
        this.backUserInfoId = backUserInfoId;
    }

    public Long getLxChannelId() {
        return lxChannelId;
    }

    public void setLxChannelId(Long lxChannelId) {
        this.lxChannelId = lxChannelId;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public String getTransactionNo() {
        return transactionNo;
    }

    public void setTransactionNo(String transactionNo) {
        this.transactionNo = transactionNo;
    }

    public String getCardSn() {
        return cardSn;
    }

    public void setCardSn(String cardSn) {
        this.cardSn = cardSn;
    }

    public String getRealName() {
        return realName;
    }

    public void setRealName(String realName) {
        this.realName = realName;
    }

    public String getUserPhone() {
        return userPhone;
    }

    public void setUserPhone(String userPhone) {
        this.userPhone = userPhone;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getAddressDetail() {
        return addressDetail;
    }

    public void setAddressDetail(String addressDetail) {
        this.addressDetail = addressDetail;
    }

    public String getGoodsDetail() {
        return goodsDetail;
    }

    public void setGoodsDetail(String goodsDetail) {
        this.goodsDetail = goodsDetail;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public String getPicUrlJson() {
        return picUrlJson;
    }

    public void setPicUrlJson(String picUrlJson) {
        this.picUrlJson = picUrlJson;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getGoodsType() {
        return goodsType;
    }

    public void setGoodsType(String goodsType) {
        this.goodsType = goodsType;
    }

    public BigDecimal getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(BigDecimal totalPrice) {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getPayPrice() {
        return payPrice;
    }

    public void setPayPrice(BigDecimal payPrice) {
        this.payPrice = payPrice;
    }

    public BigDecimal getDeductionAmount() {
        return deductionAmount;
    }

    public void setDeductionAmount(BigDecimal deductionAmount) {
        this.deductionAmount = deductionAmount;
    }

    public Integer getHandlingMethod() {
        return handlingMethod;
    }

    public void setHandlingMethod(Integer handlingMethod) {
        this.handlingMethod = handlingMethod;
    }

    public LocalDateTime getPayTime() {
        return payTime;
    }

    public void setPayTime(LocalDateTime payTime) {
        this.payTime = payTime;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public Integer getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(Integer payStatus) {
        this.payStatus = payStatus;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getDeliveryCompany() {
        return deliveryCompany;
    }

    public void setDeliveryCompany(String deliveryCompany) {
        this.deliveryCompany = deliveryCompany;
    }

    public String getDeliverySn() {
        return deliverySn;
    }

    public void setDeliverySn(String deliverySn) {
        this.deliverySn = deliverySn;
    }

    public String getDeliveryDate() {
        return deliveryDate;
    }

    public void setDeliveryDate(String deliveryDate) {
        this.deliveryDate = deliveryDate;
    }

    public LocalDateTime getDeliveryTime() {
        return deliveryTime;
    }

    public void setDeliveryTime(LocalDateTime deliveryTime) {
        this.deliveryTime = deliveryTime;
    }

    public LocalDateTime getTakeTime() {
        return takeTime;
    }

    public void setTakeTime(LocalDateTime takeTime) {
        this.takeTime = takeTime;
    }

    public LocalDateTime getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(LocalDateTime finishTime) {
        this.finishTime = finishTime;
    }

    public LocalDateTime getSelfWithdrawalTime() {
        return selfWithdrawalTime;
    }

    public void setSelfWithdrawalTime(LocalDateTime selfWithdrawalTime) {
        this.selfWithdrawalTime = selfWithdrawalTime;
    }
}
